<?php

namespace Gnway\Ticket\Rest\Contracts;

interface ContainerInterface
{

  /**
   * Make Instance.
   *
   * @param string $class
   * @param array  $args
   * @return mixed
   */
  public static function make(string $class, array $args = []);

  /**
   * Resolve instance from container.
   *
   * @param string $class
   * @return mixed
   */
  public static function resolve(string $class);

  /**
   * Bind instance to container.
   *
   * @param string $class
   * @param object $instance
   * @return object
   */
  public static function bind(string $class, object $instance): object;

  /**
   * Unbind instance from container.
   *
   * @param string $class
   * @return void
   */
  public static function unbind(string $class): void;

  /**
   * Resolve the parameters of a specified function.
   *
   * @param string|Closure $function
   * @param array           $default
   * @return array
   */
  public static function getFunctionParameters($function, array $default = []): array;

  /**
   * Resolve the parameters of a specified method.
   *
   * @param string|object $class
   * @param string        $method
   * @param array         $default
   * @return array
   */
  public static function getMethodParameters($class, string $method, array $default = []): array;

}